﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZX.SYS.Bussiness;
using System.Data;
using ZX.Web.UI.Controls;
namespace ZX.WebApp.Message
{
    public partial class GroupBy : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                bangddl();
                gbids.Value = Request.QueryString["gbids"].ToString().TrimEnd(';');
                txtusernames.Value = Server.UrlDecode(Request.QueryString["gbmbs"]).ToString().TrimEnd(';');
                userid.Value = User.UserID.ToString();
                if (Request.QueryString["type"] == null)
                {
                    Label1.Text = "将以上人员归类到组：";
                    ddlgroupby.SelectedValue = Request.QueryString["typeid"];
                }
                else
                {
                    Label1.Text = "将以上人员从该群组中移除：";
                    ddlgroupby.SelectedValue = Request.QueryString["typeid"];
                    ddlgroupby.Enabled = false;
                }
                
            }
        }

        public void bangddl()
        {
            DataTable dt = (new MQproccess()).GetGroupType();
            ddlgroupby.DataSource = dt;
            ddlgroupby.DataTextField = "otname";
            ddlgroupby.DataValueField = "otid";
            ddlgroupby.DataBind();
        }
    }
}